<?php
namespace app\plus_exam\validate;
use think\Validate;


class School extends Validate{

	protected $rule = [
         'id'              => 'require',
		 'category_id'     => 'require',
         'name'            => 'require',
         'start_time'      => 'require',
         'end_time'        => 'require',
         'is_repeat'       => 'require',
         'lock_time'       => 'require|number',
         'start_lock_time' => 'require|number',
         'question_number' => 'require|number',
         'one_point'       => 'require|number',
	];

    
	protected $meassge = [
        'id'              => '未找到编辑资源',
        'name'            => '{%lang_school_name}',
        'category_id'     => '题库必须选择',
        'name'            => '考场名称必须填写',
        'start_time'      => '开始考试必须填写',
        'end_time'        => '结束考试必须填写',
        'is_repeat'       => '允许考试次数必须填写',
        'lock_time'       => '考试时限必须填写',
        'start_lock_time' => '交卷限时必须填写',
        'question_number' => '题目数量必须填写',
        'one_point'       => '每题分数必须填写',
	];

	protected $scene = [
        'add'   =>  ['name','start_time','end_time','is_repeat','start_lock_time','question_number','one_point'],
        'edit'  =>  ['id','name','start_time','end_time','is_repeat','start_lock_time','question_number','one_point'],
    ];
} 